Class GraphicThread<T extends java.io.Serializable & java.lang.Comparable<T>>

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphicThread()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      MyPane getPane()  
      Tree<T> getTree()  
      abstract void run()
      abstraktna metoda ktoru musi mat kazdy potomok tejto triedy
      void setPane​(MyPane p)  
      void setSleepTime​(boolean pridaj)
      funkcia ktora upravi SLEEP_TIME podla parametra pridaj ak je true, prida 500 ak je false, odcita 500 kontroluje tieto hodnoty ci nie su v hraniciach ak ano neurobi nic
      void setTree​(Tree<T> t)  
      void skip()
      nastavi sleep time na 0 cim vlastne thread nebude spat
      Node<T> threadFindFatherByNode​(Node<T> node, Node<T> find)
      graficky prerobena funkcia Node.FindFatherByNode()
      boolean threadRemove​(Node<T> node, Node<T> find)
      graficky odstrani vrchol zo synov pokusi sa najst otca, ak je null skusi ci nema odstranit vrchol ak najde odstrani find zo synov
      • Methods inherited from class java.lang.Thread

        activeCount, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GraphicThread

        public GraphicThread()
    • Method Detail

      • getTree

        public Tree<T> getTree()
        Returns:
        vrati tree
      • setTree

        public void setTree​(Tree<T> t)
        Parameters:
        t - nastavi tree na t
      • getPane

        public MyPane getPane()
        Returns:
        vrati pane na ktorom thread pracuje
      • setPane

        public void setPane​(MyPane p)
        Parameters:
        p - nastavi pane na p
      • skip

        public void skip()
        nastavi sleep time na 0 cim vlastne thread nebude spat
      • setSleepTime

        public void setSleepTime​(boolean pridaj)
        funkcia ktora upravi SLEEP_TIME podla parametra pridaj ak je true, prida 500 ak je false, odcita 500 kontroluje tieto hodnoty ci nie su v hraniciach ak ano neurobi nic
        Parameters:
        pridaj -
      • threadRemove

        public boolean threadRemove​(Node<T> node,
                                    Node<T> find)
        graficky odstrani vrchol zo synov pokusi sa najst otca, ak je null skusi ci nema odstranit vrchol ak najde odstrani find zo synov
        Parameters:
        node - koren stromu z ktoreho sa odstranuje
        find - vrchol ktory sa odstranuje
      • threadFindFatherByNode

        public Node<T> threadFindFatherByNode​(Node<T> node,
                                              Node<T> find)
        graficky prerobena funkcia Node.FindFatherByNode()
        Parameters:
        node - koren stromu v ktorom sa hlada
        find - vrchol ktoremu sa hlada otec
      • run

        public abstract void run()
        abstraktna metoda ktoru musi mat kazdy potomok tejto triedy
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread